home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 376-400 / disk_398 / formatter / preinclude.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  118 lines

  1. /* $Revision Header * Header built automatically - do not edit! *************
  2.  *
  3.  *    (C) Copyright 1990 by MXM
  4.  *
  5.  *    Name .....: PreInclude.c
  6.  *    Created ..: Thursday 31-May-90 19:49
  7.  *    Revision .: 1
  8.  *
  9.  *    Date            Author          Comment
  10.  *    =========       ========        ====================
  11.  *    24-Jul-90       Olsen           Added __NO_PRAGMAS and FormatterPort
  12.  *    31-May-90       Olsen           Created this file!
  13.  *
  14.  ****************************************************************************
  15.  *
  16.  *    This file contains various includes/definitions used by Formatter.c
  17.  *
  18.  * $Revision Header ********************************************************/
  19.  
  20.     /* Note: I discovered that inline-library calls actually
  21.      *       slowed down the program and caused it to become
  22.      *       larger than necessary.
  23.      */
  24.  
  25. #define __NO_PRAGMAS 1
  26.  
  27. #include <intuition/intuitionbase.h>
  28. #include <libraries/filehandler.h>
  29. #include <libraries/dosextens.h>
  30. #include <devices/trackdisk.h>
  31. #include <libraries/arpbase.h>
  32. #include <graphics/gfxbase.h>
  33. #include <hardware/dmabits.h>
  34. #include <hardware/custom.h>
  35. #include <hardware/blit.h>
  36. #include <devices/timer.h>
  37. #include <exec/devices.h>
  38. #include <exec/memory.h>
  39. #include <functions.h>
  40.  
  41.     /* This is the typical form of a disk bitmap (well, this
  42.      * is how it would look like in 'C').
  43.      */
  44.  
  45. struct DosBitmap
  46. {
  47.     ULONG    CheckSum;    /* Block checksum. */
  48.  
  49.     ULONG    BitmapData[55];    /* 55 × 32 Bits = 1760 blocks. */
  50.  
  51.     ULONG    WhoKnows0[72];    /* 72 unused bytes (to fit into 512 bytes). */
  52. };
  53.  
  54.     /* This structure describes the root directory of a disk. */
  55.  
  56. struct DosDirectory
  57. {
  58.     ULONG            PrimaryType;        /* Primary type. */
  59.     ULONG            HeaderKey;        /* Header key, always null. */
  60.  
  61.     ULONG            WhoKnows0;
  62.     ULONG            HashTableSize;        /* Size of hash table (128 - 56 = 72). */
  63.     ULONG            WhoKnows1;
  64.  
  65.     ULONG            CheckSum;        /* Block checksum. */
  66.  
  67.     ULONG            HashTable[72];        /* Hash table (filled in later). */
  68.  
  69.     ULONG            BitmapFlag;        /* DOSTRUE if bitmap is valid. */
  70.  
  71.     ULONG            BitmapPointers[25];    /* Pointers to bitmap blocks. */
  72.     ULONG            BitmapExtension;    /* Pointer to bitmap extra information. */
  73.  
  74.     struct DateStamp    LastRootChange;        /* Time and date of last change in root directory. */
  75.  
  76.     char            DiskName[32];        /* Disk name as a BCPL string (max. 31 characters). */
  77.  
  78.     ULONG            WhoKnows2[2];
  79.  
  80.     struct DateStamp    LastDiskChange;        /* Time and date of last change on disk. */
  81.     struct DateStamp    CreationDate;        /* Time and date of disk creation. */
  82.  
  83.     ULONG            NextHash;        /* Next entry in hash chain (userdir only). */
  84.     ULONG            ParentDir;        /* Pointer to block with parent dir (userdir only). */
  85.  
  86.     ULONG            WhoKnows3;
  87.  
  88.     ULONG            SecondaryType;        /* Secondary type (huh?). */
  89. };
  90.  
  91.     /* Global shared MsgPort. */
  92.  
  93. struct FormatterPort
  94. {
  95.     struct MsgPort    Port;            /* Standard exec link field. */
  96.  
  97.     BYTE        DriveInUse[4];        /* Occupied drives. */
  98.  
  99.     BYTE        NumPrgs;        /* Number of Formatters currently running. */
  100. };
  101.  
  102.     /* Hard coded disk data. */
  103.  
  104. #define NUMCYLS        80            /* Number of cylinders. */
  105. #define NUMHEADS    2            /* Number of heads. */
  106. #define NUMTRACKS    (NUMCYLS * NUMHEADS)    /* Number of tracks. */
  107.  
  108. #define T_SHORT        2            /* Primary type. */
  109. #define ST_ROOT        1            /* Secondary type. */
  110.  
  111. #define MILLION        1000000            /* Yes, this is a million. */
  112.  
  113.     /* External library reference. */
  114.  
  115. extern struct ArpBase        *ArpBase;
  116. extern struct IntuitionBase    *IntuitionBase;
  117. extern struct GfxBase        *GfxBase;
  118.